%% Manylabs robust predictive analysis
% Replicates Figure A-8 

% Define the function element-wise
f = @(x) arrayfun(@(t) cva(t, [], 0.2) / (1.282 * sqrt(t + 1)), x);

% Evaluate the function
x_vals = linspace(0, 100, 2000);
y_vals = f(x_vals);

% Plot
CI_ratio_plot = plot(x_vals, y_vals, 'k', 'LineWidth', 1.5);
xlabel('');
ylabel('');
title('');
set(gca, 'FontSize', 18);
box off;  

saveas(CI_ratio_plot, '../Results/CI_rat_func.png');